﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NamingOnLessonUtility;
using NamingOnLessonEntity;
using NamingOnLessonRepositry;

namespace NamingOnLessonRepositry
{

    public class RepositoryFactory<T> where T : new()
    {
        public RepositoryFactory()
        {
            T entity = new T();
            TableName = "";
            Conn = ConfigHelper.AppSettings("ConnName");
        }
        public string TpiTableName
        {
            get;
            private set;
        }
        public string TableName
        {
            get;
            private set;
        }
        public string Conn
        {
            get;
            private set;
        }
        /// <summary>
        /// 定义通用的Repository
        /// </summary>
        /// <returns></returns>
        public IIRepositry<T> Repository()
        {
            return new Repositry<T>();
        }
    }
}
